Skip to content

Include prerelease gems in compact index during incremental update#108

Open
sudoremo wants to merge 1 commit intorubygems:mainfrom
sudoremo:fix-prerelease-compact-index
Open

Include prerelease gems in compact index during incremental update#108
sudoremo wants to merge 1 commit intorubygems:mainfrom
sudoremo:fix-prerelease-compact-index

Conversation

@sudoremo
Copy link

@sudoremo sudoremo commented Mar 9, 2026

Summary

Fixes #48.

In update_index, the call to update_compact_index only received released specs, excluding prerelease gems from the compact index files (versions, info/<gemname>). Since build_compact defaults to true and modern Bundler prefers the compact index over legacy specs files, prerelease gems were effectively invisible after an incremental gem generate_index --update — even though they were correctly added to prerelease_specs.4.8.gz.

The fix passes all specs (both released and prerelease) to update_compact_index, consistent with how build_compact_index already handles both during a full generate_index.

Changes

  • lib/rubygems/indexer.rb: Pass specs instead of released to update_compact_index
  • test/rubygems/test_gem_indexer.rb: Add assertions for prerelease gem d-2.2.a in compact index after update_index

In `update_index`, the call to `update_compact_index` only received
`released` specs, excluding prerelease gems from the compact index
files (`versions`, `info/<gemname>`). Since modern Bundler prefers the
compact index, prerelease gems were effectively invisible after an
incremental `--update`.

Fix by passing all specs (both released and prerelease) to
`update_compact_index`.

Fixes rubygems#48
@sudoremo sudoremo force-pushed the fix-prerelease-compact-index branch from 75bc582 to 52966ab Compare March 10, 2026 08:54
@sudoremo
Copy link
Author

The latest addition should fix all unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Versions file not updated for RC-releases

1 participant